package jdt.utils;

/**
 * Utility functions used for the triangulation
 * 
 * @author Shay
 * 
 */
public class JdtUtil {

	/**
	 * Computes the determinant of a 2x2 matrix. Uses standard double-precision
	 * arithmetic, so is susceptible to round-off error.
	 * 
	 * @param m00
	 *            the [0,0] entry of the matrix
	 * @param m01
	 *            the [0,1] entry of the matrix
	 * @param m10
	 *            the [1,0] entry of the matrix
	 * @param m11
	 *            the [1,1] entry of the matrix
	 * @return the determinant
	 */
	public static double det(double m00, double m01, double m10, double m11) {
		return m00 * m11 - m01 * m10;
	}

	
	/* --- Consts --- */
	
	public static final double PERCISION = 0.0001;
}
